// components/record/index.js
import base from '../../api/base'
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    currentIndex: Number,
    info: {
      type: Object,
      value: {
        fronturl: '',
        optdate: '',
        authdate: '',
        state: 1,
        entname: '',
        businessno: '',
        id: '',
        username: '',
        ideno: ''
      }
    },
    model: {
      type: Number
    }
  },
  lifetimes: {
    ready() {
      console.log(this.properties.info)
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    imgUrl: `${base.pro}/common/viewImage?imagepath=`
  },

  /**
   * 组件的方法列表
   */
  methods: {
    bindDelete() {
      this.triggerEvent('delete', {id:this.properties.info.id, index:this.properties.currentIndex})
    }
  }
})